/**
 * Created by Heiliuer on 2018/3/21 0021.
 */
const Koa = require('koa')
var Router = require('koa-router')
const app = new Koa()

var router = new Router()

const index = ctx => {
    ctx.response.type = 'html'
    ctx.response.body = '<html><body><h2>hello</h2></body></html>'
}


router.get('/',index)


app.use(router.routes()).use(router.allowedMethods())
app.listen(3000)